package com.nt.train.service.impl;

import com.nt.train.annotation.OrderTypeAnnotation;
import com.nt.train.enums.OrderTypeEnum;
import org.springframework.stereotype.Component;

/**
 * 京东订单-策略类
 * @author hlf
 * @version 1.0
 * @date 2021/12/20 10:54
 */
@Component
@OrderTypeAnnotation(orderType = OrderTypeEnum.JD)
public class JdOrderStrategy extends AbstractOrderStrategy {

    /**
     * 获取商品信息
     */
    @Override
    public String getGoodsInfo(String goodsName) {
        return "【京东】" + goodsName;
    }

    /**
     * 获取优惠金额
     */
    @Override
    public Double getDiscount() {
        return 50.0;
    }
}
